home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Creative Computers
/
Creative Computers CD-ROM, Volume 1 (Legendary Design Technologies, Inc.)(1994).iso
/
shareware
/
fractals
/
fracgen
/
readme
< prev
next >
Wrap
Text File
|
1994-11-17
|
12KB
|
306 lines
FRACTAL GENERATOR 1.2
Copyright (c)1988 Doug Houck
DISTRIBUTION NOTICE
This Fractal Generator may be freely distributed, so long as this
notice is retained, and no profit is gained from the distribution of
this program. Please be sure to copy the accompanying subdirectories,
with a "copy all" or by using Workbench.
SOURCE CODE
Due to the fact that this program is laced with code that is part
of commercial products (Doug's Math Aquarium, Doug's Color Commander,
both available from Seven Seas Software), the remaining code would be
of little value to you except as examples. So it has been omitted.
BUT WHAT DOES IT DO?
This program grows fractal pictures from seeds you create. It is
meant to be a tool for exploring the world of fractals. It can be
enjoyed on three levels: (1) loading and displaying fractals stored
on disk, (2) modifying existing fractals, and (3) creating your own
fractals.
The main idea of this program is very simple. Take a shape composed
of several line segments, and replace each line segment with a small
copy of the entire shape. Continue doing this until you reach the
resolution limit of your screen. For example: (Koch Snowflake)
/\
Seed / \
____/ \____
__/\__
1st Generation \ /
_/\_/ \_/\_
What you have is a self-similar fractal.
GETTING STARTED
There are a number of fractals stored on disk. To get at them,
just hit Load, and double-click on a filename. It will plot automatically.
Hit the Menu button to return to the editing screen.
If you wish to edit the shape of a fractal seed, select one of
"Add", "Delete" or "Move" from the Edit menu, and manipulate the shape
with the mouse. TIP: Keep the fractal seed simple.
To draw a new fractal, select Draw in the Fractal menu.
For more control of the fractal, select Parameters in the Fractal
menu. See below for more info on Parameters.
================= The Menu options are explained below. ==================
PROJECT
Undo Remove changes since previous Draw.
New Initialize to simplest fractal - a straight line
Load Load fractal seed and colors from disk.
Save Save fractal seed to disk.
Save Pic Save picture in IFF file
Quit Quits program.
EDIT
Add Adds a point in the nearest line segment.
Move Moves the nearest point.
Delete Deletes nearest point.
FRACTAL
Draw Draws fractal using current parameters and options.
Parameters Displays current parameters, allows editing.
See below on Parameters
Detail Length of the shortest allowed line segment.
Make larger (5?) for faster drawing.
Depth Maximum amount of times to replace line segment
with copy. Max 500, less if program stack < 25000.
MORE COMMANDS
<F1> Flip screens
<F2> Detail
<F3> Depth
Arrow keys Push fractal seed around screen
<N> New Fractal
<ESC> Stop plotting
Menu Button Flip screens
<F> Draw Fractal
For ultimate power, you may edit the files in which it saves the
seed formulas with any plain ascii editor.
FEEDBACK
The screen title bar gives feedback information as follows:
Degrees1 Length1 Degrees2 Length2 PixelX PixelY
\/ \/ \/
Line to Left Line to Right Absolute Pixel Coordinates
Degrees is the change in heading relative to the line to the left.
(previous line)
Length is the length of the line in pixels.
Pixel is the absolute screen location, where y increases from top
to bottom.
PARAMETERS
RECURSION LEVELS means the following parameters are applied on
a level by level (generation) basis, where the first character
applies to the first generation, the second character applies
to the second generation... The parameters for the level are
used BEFORE the line segment parameters.
LINE SEGMENTS means the following parameters are applied to
the individual line segments of the seed shape. The first
character applies to the first line segment (starting from the
left), the second character applies to the second line segment...
REPEATING is applied to each string to make it long enough.
For example:
f = 'ffffffffffffffffffff...'
fr = 'frfrfrfrfrfrfrfrfrfr...'
vii = 'viiviiviiviiviiviivi...'
If invalid characters are present, it defaults to the first
character in the 'f/r' (or whatever) specification.
DIRECTION can be forward (f) or reverse (r). Reversing a shape
means to swap end for end.
It converts __/\ to /\__
FLIP can be either normal (n) or flipped (f). Flip means to
flip the shape along the axis formed by the endpoints of the shape.
It converts __/\ to __
\/
Flip and reverse can be combined, ergo
both flip and reverse convert __/\ to __
\/
VISIBLE can be visible (v), invisible (i), or mule (m).
It is applied to each segment of the shape numbered from left
to right (as the shape was created).
- Visible means that the line segment will propogate to the
next level, or show if it is the last one.
- Invisible means that the line segment will not show, or
propogate.
- Mule means that this line segment will show, but not
fractalize. (Mules are sterile.)
For instance, 'viv' converts __/\ to __ \
COLOR controls how often the color register is advanced.
For example, '001' would not increment the color on the first
2 levels of recursion, but would advance by 1 on the third level.
EXPERIMENT with each of these controls with depth set to 2 or 3,
a simple shape, varying one parameter at a time.
============================================================================
'Fractal Will Expand' requester - what it means.
Imagine a line drawn from one endpoint of your shape to the other. If any
one of the lines in your shape is bigger than this imaginary line,
the fractal will expand. The easiest way to fix this is to move your
shape endpoints farther apart, thereby making the component line segments
smaller in comparison.
If you decide to Try It, one of three things may happen.
1. The line drawing routine tries to draw into a far corner of the
Amiga's memory. Corners being what they are, there may be a moron
program there which is confounded by strange new opcodes. (Reader
Problem: Design a program (a la Core Wars) which can withstand the
onslaught of a line drawer gone wild.) The Amiga clips lines that
wander off the edge of the screen, IF they don't wander too far.
2. You wisely chose a small Depth, and made sure the line segments
are only marginally larger than the shape endpoint-to-endpoint
length. Some wild lines appear on your screen, but nothing blows
up.
3. Time is consumed at the following rate where:
lines_per_second = 650 on the Amiga 1000
Time = ((number_of_line_segments)^Depth)/lines_per_second
For example, the shape /\, which is two sides of an
equilateral triangle, if fractalized to a depth of 70,
would take roughly
(2^70)/650 seconds, or 58 billion years!
Not to knock the Amiga, but that's probably longer than the MTBF.
FOR HACKOIDS
You may also enter the seed shapes directly - here's how.
Select Load, and enter the Drawer "Con:0/0/200/50/input". It will
give you some "Drawer not Found"s, but hit OK anyhow. You have
just opened the console file on the workbench screen. Pull
down the FracGen screen part way, and the plotting screen too to
expose the "input" window on Workbench.
Now type commands in the "input" window just like they would appear
in a formula file. The two most useful commands are:
Point x y ; Line to this point.
Angle degrees length ; Turn in this direction, and
; draw a line this long.
; This is relative to your current
; heading, a la Turtle Graphics.
I would suggest a sequence like the following for the Koch Snowflake
Point 100 100 ;. ; define starting point
Angle 0 75 ; __ ; start pointing thisaway-->
Angle